#ifndef _game_GameOptions_hpp_
#define _game_GameOptions_hpp_

/** \file GameOptions.hpp
 *  \author Adrian Schweizer
 *  \created  $Sa 06 Okt 06:45:25 pm CEST 2007 schwadri@SchwadriLaptop$
 *  \modified $Sa 06 Okt 07:02:12 pm CEST 2007 schwadri@SchwadriLaptop$
 */

#include <boost/signal.hpp>
#include <boost/serialization/access.hpp>

namespace game {

    /** \brief Encapsulates all game logic specific options.
     *
     *  Whenever an option is changed, the option is validated and if the new value
     *  is different from the old value and valid the ChangedSignal is invoked.
     */
    class GameOptions
    {
    public:
        //FIXME:GameOptions();
        //FIXME:GameOptions(const GameOptions& go);

        /** \name Signal Types */ //@{
        typedef boost::signal<void (const GameOptions&)> ChangedSignalType; ///< emitted when the gameoptions have changed
        //@}

        /** \name Slot Types */ //@{
        typedef ChangedSignalType::slot_type ChangedSlotType; ///< type of functor(s) invoked on a ChangedSignalType
        //@}
        GameOptions&    operator=(const GameOptions& go);

        mutable ChangedSignalType   ChangedSignal;///< connect to this signal to get notified of changes

        friend class boost::serialization::access;

    private:
        template<class Archive>
            void serialize(Archive & ar, const int version)
            { }
    };

} // namespace game

#endif // _game_GameOptions_hpp_
